#include <stdio.h>
#include "../../liboctopus/src/octopus.h"

int main()
{

  struct octopus_context octopus;
   
  octopus_init(&octopus);
  octopus_open(&octopus);
  octopus_i2c_init(&octopus);
  octopus_i2c_set_bitrate(&octopus,3); //100kHz
 
    octopus_i2c_send_start(&octopus);
  while(1){
    
    //octopus_i2c_receive_byte(&octopus, 0x10, 1);
    
    //blink
    octopus_i2c_send_byte(&octopus, 0x10, 1,1);
    sleep(1);
    octopus_i2c_send_byte(&octopus, 0x10, 0,1);
    sleep(1);
  }
    octopus_i2c_send_stop(&octopus);
  return 0;


}

